public void testDistribution2TargetAssociations() {
initializeRepositoryAdmin();
DistributionObject d1 = createBasicDistributionObject("distribution1");
TargetObject t1 = createBasicTargetObject("target1");
m_distribution2TargetRepository.create(d1, t1);
assert d1.getFeatures().size() == 0 : "Distribution 1 should not be associated with any features; it is associated with " + d1.getFeatures().size() + ".";
assert d1.getTargets().size() == 1 : "Distribution 1 should be associated with exactly one target; it is associated with " + d1.getTargets().size() + ".";
assert t1.getDistributions().size() == 1 : "Target 1 should be associated with exactly one distribution; it is associated with " + t1.getDistributions().size() + ".";
}
|